-- GENERATED SPELL FOR [Hive'Regal Hunter-Killer] --


function spell0_15620(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(25821,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15620', 2345, 1)
end

function spell1_15620(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40504,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15620', 620, 1)
end

function spell2_15620(pUnit, Event) --@Frightening Shriek,Self--
pUnit:FullCastSpellOnTarget(25815,pUnit)
pUnit:RegisterEvent('Sorts_15620', 6251, 1)
end

function spell3_15620(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15588,pUnit)
pUnit:RegisterEvent('Sorts_15620', 10330, 1)
end

function Sorts_15620(pUnit, Event)
local choix_sorts_15620 = math.random(0, 3)
if choix_sorts_15620 == 0 then
pUnit:RegisterEvent('spell0_15620', 1, 1)
end
if choix_sorts_15620 == 1 then
pUnit:RegisterEvent('spell1_15620', 1, 1)
end
if choix_sorts_15620 == 2 then
pUnit:RegisterEvent('spell2_15620', 1, 1)
end
if choix_sorts_15620 == 3 then
pUnit:RegisterEvent('spell3_15620', 1, 1)
end
end

function mob15620_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15620', math.random(1500, 3000), 1)
end

function mob15620_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15620_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15620_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15620, 1, 'mob15620_Action')
RegisterUnitEvent(15620, 2, 'mob15620_Leave')
RegisterUnitEvent(15620, 3, 'mob15620_Kill')
RegisterUnitEvent(15620, 4, 'mob15620_Die')
